<include file="Public:header" />
<include file="Public:left" />
	<form action="" method="post" enctype="multipart/form-data" id="brandForm">
      <input type="hidden" id="id" name="id" value="{$id}">
     <section>
      <h2><strong>分类设置</strong></h2>
      <ul class="ulColumn2">
	     <li>
        <span class="item_name" style="width:120px;">机构分类名：</span>
        <input type="text" value="{$mechanism_category_result['name']}" class="textbox textbox_295" name="name" id="telephone" placeholder="机构名"/>
       </li>
       <li>
        <span class="item_name" style="width:120px;">排序：</span>
        <input type="text" value="{$mechanism_category_result['orders']}" class="textbox textbox_295" name="order" id="telephone" placeholder="排序"/>
       </li>
       <li>
        <span class="item_name" style="width:120px;"></span>
        <input type="button" class="link_btn" value="提交"/>
       </li>
      </ul>
     </section>
	 </form>
   <script>
      $(".link_btn").click(function(){
          var name = $("input[name='name']").val();
          var order = $("input[name='order']").val();
          var id = $("input[name='id']").val();

          $.post("{:url('Mechanism/add_category')}",{id:id,name:name,order:order},function(result){
            if(result.code == '0'){
                layer.alert(result.msg);
            }else{
                layer.alert(result.msg, {   
                    btn: ['确定']  
                },  
                    function (index, item) { 
                    location.href = result.url;
                });  
            }
          });
      });
   </script>
 </div>
</section>
</body>
</html>
